package com.example.strategyproject.strategy;

/**
 * @author ycd0075
 * @date 2024-01-25 20:37
 */
public class Context {

    private IPromotionStrategy promotionStrategy;

    public Context(IPromotionStrategy promotionStrategy) {
        this.promotionStrategy = promotionStrategy;
    }

    public void doPromotion() {
        System.out.println("执行促销策略开始");
        promotionStrategy.execute();
        System.out.println("执行促销策略结束");
    }
}

